package org.jeecg.service;

import org.jeecg.entity.basedata.BaseFeeRule;
import org.jeecg.entity.basedata.BaseProject;
import org.jeecg.entity.basedata.BaseRoom;
import org.jeecg.entity.basedata.RentContract;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;


/**
 * @Description: 基础房产数据
 * @Author: liuR
 * @Date:   2021-02-05
 * @Version: V1.0
 */
@FeignClient("CIM-BASEDATA")
public interface IFeignBaseDataService {

	@RequestMapping(value = "/api/basedata/getByRoomIds",method = RequestMethod.POST)
	List<BaseRoom> getByRoomIds(@RequestParam("roomIds") String [] roomIds,@RequestHeader("tenantId") String tenantId);

	/**
	 * 获取收费规则
	 * @param feeRuleId
	 * @param tenantId
	 * @return
	 */
	@RequestMapping(value = "/api/basedata/getBaseFeeRuleById" ,method = RequestMethod.POST)
	BaseFeeRule getBaseFeeRuleById(@RequestBody String feeRuleId, @RequestHeader("tenantId")String tenantId);

	/*id数量很多的时候调用*/
	@RequestMapping(value = "/api/basedata/getByRoomIdsLarge",method = RequestMethod.POST)
	List<BaseRoom> getByRoomIdsLarge(@RequestBody String queryParam, @RequestHeader("tenantId") String tenantId);


	@RequestMapping(value = "/api/basedata/getByCustomerId",method = RequestMethod.POST)
	String getByCustomerId(@RequestParam("roomId") String  roomId,@RequestHeader("tenantId") String tenantId);

	@RequestMapping(value = "/api/basedata/getByTenantId",method = RequestMethod.POST)
	String getByTenantId(@RequestParam("roomId") String  roomId,@RequestHeader("tenantId") String tenantId);

	@RequestMapping(value = "/api/basedata/getRoomById",method = RequestMethod.POST)
	BaseRoom getByRoomIds(@RequestParam("roomId") String roomId, @RequestHeader("tenantId") String tenantId);

	/*用于前端拉取对应所有项目数据，暂无权限控制*/
	@RequestMapping(value = "/api/basedata/findProjectAll",method = RequestMethod.POST)
	List<BaseProject> findProjectAll(@RequestHeader("tenantId") String tenantId);

}
